package com.heima.feign.comment;

import com.heima.model.comment.pojos.CommentLikeDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.AuthorLikeDto;
import com.heima.model.wemedia.dtos.CommentListDto;
import com.heima.model.wemedia.dtos.WmRepayCommentDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-comment")
public interface ICommentClient {

    /**
     * 评论列表展示
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/comment/list")
    public ResponseResult list(@RequestBody CommentListDto dto);

    /**
     * 作者点赞评论
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/comment/authorLike")
    public ResponseResult like(@RequestBody AuthorLikeDto dto);

    /**
     * 作者回复评论
     * @param dto
     */
    @PostMapping("/api/v1/comment/repay")
    ResponseResult repay(@RequestBody WmRepayCommentDto dto);
}
